<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title">确认操作</h4>
</div>
<form id="defaultForm" method="post" class="form-horizontal" action="/alarm/alarm_save">
    <!-- 模态框主体 -->
    <div class="modal-body">
        <input name="id"  style="display: none" th:value="${alramAllInfo.id}">
        <div class="container col-lg-12">
            <div style="float: left; width: 70%">
                <ul class="list-group">
                    <li class="list-group-item ">故障名称</li>
                    <li class="list-group-item ">发生时间</li>
                    <li class="list-group-item ">发现时间</li>
                    <li class="list-group-item ">联系人</li>
                   <!-- <li class="list-group-item ">联系方式</li>-->
                </ul>
            </div>
            <div style="float: right;width: 30%">
                <ul class="list-group">
                    <li name=" equipmentName" class="list-group-item "
                        th:text="${alramAllInfo.equipmentName}"></li>
                    <li class="list-group-item "
                        th:text="${alramAllInfo.createTime}"></li>
                    <li class="list-group-item "
                        th:text="${alramAllInfo.operateTime}"></li>
                    <li name = "createUser" class="list-group-item "
                        th:each="info:${user}"
                        th:text="${info.name}"></li>
                 <!--   <li class="list-group-item "></li>-->

                </ul>
            </div>
            <div class="form-group">
                <label class="col-lg-1 control-label">原因分析</label>
                <div class="col-lg-11">
                    <textarea style="height:60px" class="form-control" name="operateContent" id="operateContent"></textarea>
                </div>
            </div>
        </div>

        <div class="col-lg-12">

            <fieldset id="oper">
                <legend>下一步操作建议</legend>
                <div hidden style="text-align: center" id="statusOne">
                    <button name="CL" type="button" onclick="clBtn()" style="background: #DD5A43">处理</button>
                    <button name="ZF" type="button" onclick="zfBtn()" style="background: #00BE67">作废</button>
                </div>
            </fieldset>

        </div>
    </div>

    <!-- 模态框底部 -->
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary">确认</button>
    </div>
</form>

<style>
    .modal-body {
        width: 800px;
        height: 380px;
    }
    .modal-dialog{
        width: 800px;
        height: 400px;
    }

    li {
        height: 45px;
    }

</style>

<script th:inline="javascript">
    initCheck();
    /***********************显示状态按钮*****************************/
        //从页面上回去状态
    var state = [[${state}]];
    var id = [[${id}]]
    $(function (status) {
        status = state;
        if (status == 1) {
            $("#statusOne").show()
        }
    });

    /**************************状态按钮异步操作********************/
    function clBtn(clid) {
        //确认按钮------>处理按钮
        clid = id;
        $.ajax({
            url: "/alarm/alter_statecl",
            data:{"id":clid},
            type: "post",
            success: function(data) {
                $("#dataTable").bootstrapTable('refresh', {url: 'alarm_data'});
            }
        });
    }
    function zfBtn(zfid) {
        //处理按钮------->作废按钮
        zfid = id;
        $.ajax({
            url: "/alarm/alter_state",
            data:{"id":zfid},
            type: "post",
            success: function(data) {
                $("#dataTable").bootstrapTable('refresh', {url: 'alarm_data'});

            }
        });
    }


</script>